inherited FPesquisaPedidoVenda: TFPesquisaPedidoVenda
  Left = 362
  Top = 172
  Caption = 'Pesquisa Pedido Venda'
  ClientHeight = 364
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel2: TPanel
    inherited BtnLimpar: TBitBtn
      OnClick = BtnLimparClick
    end
    inherited BtnImprimir: TBitBtn
      OnClick = BtnImprimirClick
    end
    inherited BtnSelecionar: TBitBtn
      OnClick = BtnSelecionarClick
    end
  end
  inherited Panel1: TPanel
    Height = 323
    object Label2: TLabel [0]
      Left = 5
      Top = 38
      Width = 32
      Height = 13
      Caption = 'Cliente'
    end
    object Label9: TLabel [1]
      Left = 215
      Top = 2
      Width = 23
      Height = 13
      Caption = 'Data'
    end
    object Label6: TLabel [2]
      Left = 306
      Top = 19
      Width = 6
      Height = 13
      Caption = 'a'
    end
    object Label10: TLabel [3]
      Left = 5
      Top = 169
      Width = 46
      Height = 13
      Caption = 'Empresas'
    end
    object Label1: TLabel [4]
      Left = 5
      Top = 2
      Width = 33
      Height = 13
      Caption = 'Pedido'
    end
    object Label3: TLabel [5]
      Left = 79
      Top = 19
      Width = 6
      Height = 13
      Caption = 'a'
    end
    object Label4: TLabel [6]
      Left = 221
      Top = 38
      Width = 46
      Height = 13
      Caption = 'Vendedor'
    end
    object Label5: TLabel [7]
      Left = 5
      Top = 74
      Width = 49
      Height = 13
      Caption = 'Atendente'
    end
    object Label7: TLabel [8]
      Left = 221
      Top = 74
      Width = 49
      Height = 13
      Caption = 'Solicitante'
    end
    inherited DBGrid1: TDBGrid
      Top = 223
      Height = 79
      TabOrder = 12
      Columns = <
        item
          Expanded = False
          FieldName = 'PED_CODIGO'
          Title.Caption = 'Pedido'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PED_DATA'
          Title.Caption = 'Data'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'CLI_RAZAO'
          Title.Caption = 'Cliente'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PED_NUMEROCLIENTE'
          Title.Caption = 'N'#176' Pedido Cliente'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VEND_NOME'
          Title.Caption = 'Vendedor'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PROD_DESCRICAOENT'
          Title.Caption = 'Produto'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'PROD_REFERENCIA'
          Title.Caption = 'Referencia'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'ITENSPED_QUANTIDADE'
          Title.Caption = 'Quantidade'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'ITENSPED_QUANTIDADEATEND'
          Title.Caption = 'Quantidade Atendida'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'ITENSPED_VALORUNIT'
          Title.Caption = 'Valor unit'#225'rio'
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'ITENSPED_VALORTOTAL'
          Title.Caption = 'Valor Total'
          Visible = True
        end>
    end
    inherited Panel3: TPanel
      Top = 302
      TabOrder = 13
    end
    object DBLCBCliente: TDBLookupComboBox
      Left = 5
      Top = 52
      Width = 211
      Height = 21
      KeyField = 'CLI_CODIGO'
      ListField = 'CLI_RAZAO'
      ListSource = DSCliente
      TabOrder = 4
      OnKeyDown = DBLCBClienteKeyDown
    end
    object DEDataIni: TDateEdit
      Left = 215
      Top = 15
      Width = 92
      Height = 21
      NumGlyphs = 2
      TabOrder = 2
    end
    object DEDataFim: TDateEdit
      Left = 314
      Top = 15
      Width = 92
      Height = 21
      NumGlyphs = 2
      TabOrder = 3
    end
    object CkBTodasEmpresas: TCheckBox
      Left = 5
      Top = 153
      Width = 118
      Height = 17
      Caption = 'Todas as Empresas'
      TabOrder = 10
      OnClick = CkBTodasEmpresasClick
    end
    object CLBEmpresas: TCheckListBox
      Left = 1
      Top = 183
      Width = 409
      Height = 40
      Align = alBottom
      Columns = 1
      ItemHeight = 13
      TabOrder = 11
    end
    object EPedidoIni: TEdit
      Left = 5
      Top = 15
      Width = 73
      Height = 21
      TabOrder = 0
    end
    object EPedidoFim: TEdit
      Left = 89
      Top = 15
      Width = 73
      Height = 21
      TabOrder = 1
    end
    object RGSituacaoPedido: TRadioGroup
      Left = 5
      Top = 109
      Width = 158
      Height = 42
      Caption = 'Situa'#231#227'o Pedido'
      Columns = 2
      ItemIndex = 3
      Items.Strings = (
        'Em aberto'
        'Encerrado'
        'Cancelado'
        'Todos')
      TabOrder = 8
    end
    object RGSituacaoItempedido: TRadioGroup
      Left = 221
      Top = 109
      Width = 158
      Height = 42
      Caption = 'Situa'#231#227'o Item Pedido'
      Columns = 2
      ItemIndex = 3
      Items.Strings = (
        'Em aberto'
        'Encerrado'
        'Cancelado'
        'Todos')
      TabOrder = 9
    end
    object DBLCBVendedor: TDBLookupComboBox
      Left = 221
      Top = 52
      Width = 188
      Height = 21
      KeyField = 'VEND_CODIGO'
      ListField = 'VEND_NOME'
      ListSource = DSVendedor
      TabOrder = 5
      OnKeyDown = DBLCBClienteKeyDown
    end
    object EAtendente: TEdit
      Left = 5
      Top = 88
      Width = 213
      Height = 21
      CharCase = ecUpperCase
      TabOrder = 6
    end
    object ESolicitante: TEdit
      Left = 221
      Top = 88
      Width = 185
      Height = 21
      CharCase = ecUpperCase
      TabOrder = 7
    end
  end
  inherited QPesquisa: TQuery
    SQL.Strings = (
      
        'Select Ped_Codigo,Ped_data,PED_NUMEROCLIENTE,PED_NATUREZA,PED_SI' +
        'TUACAO,PED_ATENDENTE,PED_SOLICITANTE,PED_VALOR,PED_VALORDESCONTO' +
        ',PED_VALORFINAL,Cli_Razao,Vend_Nome,'
      
        'ItensPed_Codigo,ITENSPED_DESCRICAOSERVICO,ItensPed_Quantidade,IT' +
        'ENSPED_QUANTIDADEATEND,ItensPed_ValorUnit,ITENSPED_VALORTotal,It' +
        'ensPed_Situacao,ITENSPED_DATAENTREGA,Prod_Codigo,Prod_DescricaoS' +
        'ai,Prod_Referencia,Prod_UnidSaida,PROD_TIPO,'
      'Loc_descricao'
      'from'
      
        'Cliente Right join(Vendedor Right join(PedidoVenda Left Join(Loc' +
        'al Inner Join (ItensPedidoVenda left join Produto on ItensPed_Pr' +
        'oduto = Prod_Codigo) on Loc_codigo = ItensPed_Local ) on Ped_Cod' +
        'igo = Itensped_Pedido) on Vend_Codigo = Ped_Vendedor) on Cli_Cod' +
        'igo = Ped_Cliente'
      ''
      'Where (CodigoEmpresa = 1)'
      ''
      'Group by'
      
        'Ped_Codigo,Ped_data,PED_NUMEROCLIENTE,PED_NATUREZA,PED_SITUACAO,' +
        'Cli_Razao,Vend_Nome,'
      
        'ItensPed_Codigo,Prod_Codigo,Prod_DescricaoSai,ITENSPED_DESCRICAO' +
        'SERVICO,ITENSPED_DATAENTREGA,Prod_Referencia,Prod_UnidSaida,PROD' +
        '_TIPO,'
      
        'Loc_descricao,ItensPed_Quantidade,ITENSPED_QUANTIDADEATEND,Itens' +
        'Ped_ValorUnit,ITENSPED_VALORTotal,ItensPed_Situacao,'
      
        'PED_ATENDENTE,PED_SOLICITANTE,PED_VALOR,PED_VALORDESCONTO,PED_VA' +
        'LORFINAL')
    Left = 184
    Top = 297
  end
  inherited DSPesquisa: TDataSource
    Left = 216
    Top = 297
  end
  object DSCliente: TDataSource
    DataSet = DMGestao.QCliente
    Left = 128
    Top = 87
  end
  object DSVendedor: TDataSource
    DataSet = DMGestao.QVendedor
    Left = 294
    Top = 88
  end
end
